package com.zanshine.benchmark.core.events {
	import com.zanshine.benchmark.core.TestResult;
	import flash.events.Event;

	public class BenchmarkEvent extends Event
	{
		public static const LOOP_RUNNED:String = "loopRunned";
		public static const TEST_RUNNED:String = "methodRunned";
		public static const CASE_RUNNED:String = "benchmarkRunned";
		public static const SUITE_RUNNED:String = "suiteRunned";
		public static const RESULT:String = "result";
		
		private var _result:TestResult;
		
		public function get result():TestResult
		{
			return _result;
		}
		
		public function BenchmarkEvent(type:String, result:TestResult = null, bubbles:Boolean=false, cancelable:Boolean=false)
		{
			_result = result;
			super(type, bubbles, cancelable);
		}
		
		override public function clone():Event
		{
			return new BenchmarkEvent(type, _result, bubbles, cancelable);
		}
		
	}
}